<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use backend\models\Category;

/* @var $this yii\web\View */
/* @var $model backend\models\Book */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="book-form box box-primary">
    <?=$this->render('@app/views/layouts/_tab.php')?>
    <?php $form = ActiveForm::begin(); ?>
    <div class="box-body table-responsive">

        <?= $form->field($model, 'title')->textInput() ?>

        <?= $form->field($model, 'pid')->dropDownList(Category::getListForOptions()) ?>

        <?= $form->field($model, 'is_end')->radioList(['否', '是'])?>

        <?= $form->field($model, 'is_hot')->radioList(['否', '是']) ?>

        <?= $form->field($model, 'status')->dropDownList($model->statusOptions) ?>

        <?= $form->field($model, 'desc')->textarea() ?>

        <?= $form->field($model, 'sort')->textInput() ?>

        <?= $form->field($model, 'image')->widget('common\widgets\webUpload\FileInput', [
        ])?>

    </div>
    <div class="box-footer">
        <?= Html::submitButton('保存', ['class' => 'btn btn-primary btn-flat']) ?>
    </div>
    <?php ActiveForm::end(); ?>
</div>
